{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 列表list"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "列表（list）作为 Python 中最常用的数据类型之一，是一个可增加、删除元素的可变（mutable）容器。"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 创建列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "lst = [] #创建空列表\n",
    "lst1 = [1,'xiaoming',29.5,'17312662388']\n",
    "lst2 = [['hello','world'],[12,'abc'],['三文鱼','电烤箱']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 查看列表长度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(lst) # 0\n",
    "len(lst1) # 4\n",
    "len(lst2) # 3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 遍历列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "xiaoming\n",
      "29.5\n",
      "17312662388\n"
     ]
    }
   ],
   "source": [
    "for t in lst1:\n",
    "    print(t)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "hello world\n",
      "12 abc\n",
      "三文鱼 电烤箱\n"
     ]
    }
   ],
   "source": [
    "for t1,t2 in lst2:\n",
    "    print(t1,t2)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 查找某个元素在列表中的位置"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 144,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "3"
      ]
     },
     "execution_count": 144,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ls_3=[1, 3, 12.3, 'apple', 0.001, 'apple', 'orange', 1, 2, 3, 4]\n",
    "#从列表ls_3 中找出\"apple\" 第一个匹配项的索引位置\n",
    "ls_3.index(\"apple\") "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 145,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 145,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "ls_3.index(3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用列表的append方法增加元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['abc', '123', 'efg']"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lst = ['abc','123']\n",
    "lst.append('efg')\n",
    "lst # ['abc', '123', 'efg']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用列表的insert方法增加元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['abc', 'hello', '123']"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "lst = ['abc','123']\n",
    "lst.insert(1,'hello')\n",
    "lst"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用列表的extend方法增加另一个列表"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 143,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['abc', '123', 1, 2, 3, 4, 5]\n"
     ]
    }
   ],
   "source": [
    "ls_3 = ['abc','123']\n",
    "ls_3.extend([1, 2, 3]) #在列表ls_3 结尾添加另一个列表[1, 2, 3]的元素,或者直接用+\n",
    "ls_3.extend([4,5])\n",
    "print (ls_3)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用列表的pop方法移除元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "efg\n",
      "['abc', '123']\n"
     ]
    }
   ],
   "source": [
    "lst = ['abc', '123', 'efg']\n",
    "# 列表的pop方法返回移除的元素\n",
    "a = lst.pop()\n",
    "print(a) # efg\n",
    "print(lst) #['abc', '123']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "123\n",
      "['abc', 'efg']\n"
     ]
    }
   ],
   "source": [
    "lst = ['abc', '123', 'efg']\n",
    "a = lst.pop(1)\n",
    "print(a) # 123\n",
    "print(lst) # ['abc', 'efg']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用列表的remove方法移除元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "None\n",
      "['abc', '123']\n"
     ]
    }
   ],
   "source": [
    "lst = ['abc', '123', 'efg']\n",
    "# 列表的remove方法没有返回值\n",
    "a = lst.remove('efg')\n",
    "print(a) # None\n",
    "print(lst) # ['abc', '123']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 使用关键字del删除列表中的元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 110,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['苹果', '香蕉', '香蕉']"
      ]
     },
     "execution_count": 110,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = ['苹果','香蕉','橘子','香蕉']\n",
    "del a[2]\n",
    "a # ['苹果', '香蕉', '香蕉']"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 列表的深浅拷贝"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['你好', [3, 'world'], [12, 'abc']]\n",
      "['你好', [3, 'world'], [12, 'abc']]\n"
     ]
    }
   ],
   "source": [
    "lst = ['你好',['hello','world'],[12,'abc']]\n",
    "# 列表的copy方法只能实现浅copy\n",
    "copy1 = lst.copy()\n",
    "copy1[1][0] = 3\n",
    "print(lst) # ['你好', [3, 'world'], [12, 'abc']]\n",
    "print(copy1) # ['你好', [3, 'world'], [12, 'abc']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "要想实现深度拷贝，需要使用 `copy` 模块的 `deepcopy` 函数"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['你好', ['hello', 'world'], [12, 'abc']]\n",
      "['你好', [3, 'world'], [12, 'abc']]\n"
     ]
    }
   ],
   "source": [
    "from copy import deepcopy\n",
    "lst = ['你好',['hello','world'],[12,'abc']]\n",
    "# 列表的copy方法只能实现浅copy\n",
    "copy1 = deepcopy(lst)\n",
    "copy1[1][0] = 3\n",
    "print(lst) # ['你好', ['hello', 'world'], [12, 'abc']]\n",
    "print(copy1) # ['你好', [3, 'world'], [12, 'abc']]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 判断某个元素是否在列表中"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "列表所有数据类型的元素，都可以用改方法判断"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = [1,2,3]\n",
    "1 in a # True\n",
    "5 in a # False\n",
    "b = ['你','好','啊']\n",
    "'你' in b #True\n",
    "c = [(1,2),(3,4)]\n",
    "(1,2) in c # True\n",
    "c = [([1,2],2),(3,4)]\n",
    "([1,2],2) in c #True\n",
    "d = [[1,2],[3,4]]\n",
    "[1,2] in d # True\n",
    "[1,3] in d # False\n",
    "'ab' in 'abc' # True"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 列表的切片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[1, 4, 7, 10, 13, 16, 19]\n"
     ]
    }
   ],
   "source": [
    "a = list(range(1,20,3))\n",
    "print(a) # [1, 4, 7, 10, 13, 16, 19]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "切片的返回结果也是一个列表"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "- 使用 `a[:3]` 获取列表 a 的前三个元素\n",
    "- 使用 `a[-1]` 获取 a 的最后一个元素，返回 int 型，值为 19\n",
    "- 使用 `a[:-1]` 获取除最后一个元素的切片 `[1, 4, 7, 10, 13, 16]`\n",
    "- 使用 `a[1:5]` 生成索引为 `[1,5)`（不包括索引 5）的切片 `[4, 7, 10, 13]`\n",
    "- 使用 `a[1:5:2]` 生成索引 `[1,5)` 但步长为 2 的切片 `[4,10]`\n",
    "- 使用 `a[::3]` 生成索引 `[0,len(a))` 步长为 3 的切片 `[1,10,19]`\n",
    "- 使用 `a[::-1]` 生成逆向索引 `[len(a),0)` 的切片 `[19, 16, 13, 10, 7, 4, 1]`\n",
    "- 使用 `a[::-3]` 生成逆向索引 `[len(a),0)` 步长为 3 的切片 `[19,10,1]`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "需要注意的是，`a[1:5:-1]`执行会返回空列表，不是生成`[1,5)`的逆向索引，如果要生成`[1,5)`的逆向索引，可以用如下方式："
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[13, 10, 7, 4]"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a[1:5:-1]  # []\n",
    "b = a[1:5:]\n",
    "b[::-1] # [13, 10, 7, 4]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 列表的操作符"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "列表的操作符只支持`+,*`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 111,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1, 2, 2, 3]"
      ]
     },
     "execution_count": 111,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[1, 2,]+[2, 3] #列表组合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 112,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1, 1, 1]"
      ]
     },
     "execution_count": 112,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[1]*3  #列表元素重复"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 113,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1, 2, 1, 2, 1, 2]"
      ]
     },
     "execution_count": 113,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "[1,2]*3"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 统计列表中某个元素的数量"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1\n",
      "2\n"
     ]
    }
   ],
   "source": [
    "a = ['苹果','香蕉','橘子','香蕉']\n",
    "print(a.count('苹果')) # 1\n",
    "print(a.count('香蕉')) # 2"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 列表转化为集合"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 65,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'橘子', '苹果', '香蕉'}"
      ]
     },
     "execution_count": 65,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a = ['苹果','香蕉','橘子','香蕉']\n",
    "set(a) # {'橘子', '苹果', '香蕉'}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 67,
   "metadata": {},
   "outputs": [
    {
     "ename": "TypeError",
     "evalue": "unhashable type: 'list'",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m                                 Traceback (most recent call last)",
      "\u001b[1;32m<ipython-input-67-6143cef6c01d>\u001b[0m in \u001b[0;36m<module>\u001b[1;34m\u001b[0m\n\u001b[0;32m      1\u001b[0m \u001b[1;31m# 几何里面必须是不可变对象\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0;32m      2\u001b[0m \u001b[0ma\u001b[0m \u001b[1;33m=\u001b[0m \u001b[1;33m[\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;33m[\u001b[0m\u001b[1;36m1\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m2\u001b[0m\u001b[1;33m,\u001b[0m\u001b[1;36m3\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m]\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[1;32m----> 3\u001b[1;33m \u001b[0mset\u001b[0m\u001b[1;33m(\u001b[0m\u001b[0ma\u001b[0m\u001b[1;33m)\u001b[0m \u001b[1;31m# 报错 unhashable type: 'list'\u001b[0m\u001b[1;33m\u001b[0m\u001b[1;33m\u001b[0m\u001b[0m\n\u001b[0m",
      "\u001b[1;31mTypeError\u001b[0m: unhashable type: 'list'"
     ]
    }
   ],
   "source": [
    "# 几何里面必须是不可变对象\n",
    "a = [[1,2],[1,2],[1,2,3]]\n",
    "set(a) # 报错 unhashable type: 'list'"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 判断中内有无重复元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 68,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 方法1\n",
    "def judge_duplicated(lst):\n",
    "    for x in lst:\n",
    "        if lst.count(x) > 1: # 判断 x 元素在 lst 中的出现次数\n",
    "            return True # 重复返回ture\n",
    "    return False  # 无重复返回false\n",
    "# 方法2\n",
    "def judge_duplicated(lst):\n",
    "    return len(lst) != len(set(lst)) # 重复返回ture，不重复返回False"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 列表使用python内置函数"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "python内置函数无需import"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 70,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "-1"
      ]
     },
     "execution_count": 70,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len([1,2,3,4,5]) # 列表长度 5\n",
    "max([1, 5, 65, 5]) #返回列表最大值 65\n",
    "min([1, -1, 89]) #返回列表最小值 -1\n",
    "# 注意：max，min只能用在纯数据的列表中"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'3'"
      ]
     },
     "execution_count": 82,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 也可以判断字符串大小，判断字符串大小是根据字符串首字符ASCII编码判断的\n",
    "max(['10','3','2']) # 返回`3`\n",
    "# 判断字符串直接用运算符\n",
    "# '10'>'3' False\n",
    "# '10'<'3' True"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 147,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['10', '2', '3']"
      ]
     },
     "execution_count": 147,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sorted(['10','3','2'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 打乱列表中的数据"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[3, 2, 6, 1, 5]"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from random import shuffle\n",
    "a = [1,3,2,5,6]\n",
    "shuffle(a) # 重洗数据\n",
    "a # [3, 2, 6, 1, 5]"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 列表排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 122,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[1, 2, 3, 5, 6]"
      ]
     },
     "execution_count": 122,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# sorted(a) a要求必须是数值型\n",
    "a = [1,3,2,5,6]\n",
    "sorted(a)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 按照列表的某个位置排序"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 135,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[13, -3], [4, 1], [1, 2], [9, 10]]"
      ]
     },
     "execution_count": 135,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 按照每一个列表的第二个位置排序\n",
    "a=[[1,2],[4,1],[9,10],[13,-3]]\n",
    "a.sort(key=lambda x: x[1])\n",
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[[13, -3], [4, 1], [1, 2], [9, 10]]"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 方法二\n",
    "a=[[1,2],[4,1],[9,10],[13,-3]]\n",
    "sorted(a,key = lambda x: x[1] )"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# 元组"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "元祖与列表很相似，只不过元组是不可变（immutable）对象，元组中的元素**不能修改**，没有增加、删除元素的方法。**元组一旦创建后，长度就被唯一确定**"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 创建元素"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {},
   "outputs": [],
   "source": [
    "tup_0 = tuple() #创建空元组\n",
    "tup_1 = () #创建空元组\n",
    "tup_2 = (1, ) #创建只包含一个元素的元组，注意要有逗号,否则会被认为元素本身\n",
    "tup_3 = (1, 3, \"apple\", 66) #创建多元素元组"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "元素除了没有增加、删除元素的方法，不能修改，其他用法与list完全一样"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(66, 'apple', 3, 1)"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tup_3[::-1] # (66, 'apple', 3, 1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
